Skip to main content

Enums and Dtos

AccountTypes Enum

Defines account access levels by numeric ID.

Enum KeyValueDescription
ADMIN1Administrator account with full privileges.
REGULAR2Regular user account with standard privileges.
STEALTH3Stealth account with restricted or hidden access.

CreateNotificationServiceDto

DTO used to create a new Notification Service.

PropertyTypeValidationDescription
namestring@IsNotEmpty()
@IsString()
The name of the notification service. Must be a non-empty string.

Validation

  • @IsNotEmpty(): Ensures the name field is provided and is not empty.
  • @IsString(): Ensures the name field is a string.

CreateNotificationPreferenceDto

DTO used to create or update a Notification Preference.

PropertyTypeValidationDescription
customerIdnumber@IsInt(), @IsNotEmpty()ID of the customer for whom the preference is set.
notificationServiceIdnumber@IsInt(), @IsNotEmpty()ID of the notification service related to the preference.
notificationTypeNotificationType (enum)@IsEnum(NotificationType), @IsNotEmpty()Type/category of notification (e.g., email, SMS).
reasonstring (optional)@IsOptional(), @IsString()Optional reason for the preference setting or change.
statusNotificationPreferenceStatus (enum)@IsEnum(NotificationPreferenceStatus), @IsNotEmpty()Status of the preference (e.g., enabled, disabled).

Validation Rules

  • @IsInt(): Ensures the property is an integer.
  • @IsNotEmpty(): Ensures the property is provided and not empty.
  • @IsEnum(): Ensures the value is a valid member of the given enum.
  • @IsOptional(): Property is optional; validation applies only if the property is present.
  • @IsString(): Ensures the property is a string.

  • NotificationType: Defines the types of notifications (e.g., EMAIL, SMS).
  • NotificationPreferenceStatus: Defines statuses such as OPTED_IN or OPTED_OUT.